﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

public class Solution55
{
    public bool CanJump(int[] nums)
    {
        int[] ranges = new int[nums.Length];
        int max = 0;
        for (int i = 0; i < nums.Length; i++)
        {
            if (i > max)
            {
return false;
            }
            ranges[i] =i+ nums[i];
            max=Math.Max(max, ranges[i]);



        }
        return true;

    }
}
